package com.j.lemon.learn.jdbc;

/**
 * @className: DbConstant
 * @description:
 * @author: lijianmin
 * @create: 2021-12-20 10:27
 **/
public interface DbConstant {
    interface URL_PREFIX {
        String MYSQL = "jdbc:mysql://";
        String GOLDENDB = "jdbc:goldendb://";
        String GOLDENDB_LB = "jdbc:goldendb:loadbalance://";
        String ORACLE = "jdbc:oracle:thin:@";
        String POSTGRESQL = "jdbc:postgresql://";
        String OCEANBASE = "jdbc:oceanbase://";
        String GBASE = "jdbc:gbasedbt-sqli://";
    }

    interface DriverClassName {
        String ORACLE = "";
        String POSGRESQL = "";
        String OCEANBASE = "com.alipay.oceanbase.jdbc.Driver";
        String GBASE = "com.gbasedbt.jdbc.Driver";
        String GOLDENDB = "com.goldendb.jdbc.Driver";
    }

    interface DbDefaultPort {
        int MYSQL = 3306;
        int GOLDENDB = 8880;
        int ORACLE = 1521;
        int POSTGRESQL = 5432;
        int OCEANBASE = 2883;
        int GBASE = 5258;
        int ANTDB = 5432;
    }

    String USERNAME = "spring.datasource.username";

    String SPRING_DATASOURCE_PWD = "spring.datasource.password";

    String URL = "spring.datasource.url";
    String MAPPER_LOCATION = "mybatis.mapper-locations";
    String MYBATIS_PLUS_MAPPER_LOCATION = "mybatis-plus.mapper-locations";


    String DRIVER_CLASS_NAME = "spring.datasource.driver-class-name";

    public interface Druid {
        String TYPE = "spring.datasource.type";
        String INITIAL_SIZE = "spring.datasource.druid.initial-size";
        String MIN_IDEL = "spring.datasource.druid.min-idle";
        String MAX_ACTIVE = "spring.datasource.druid.max-active";
        String MAX_WAIT = "spring.datasource.druid.max-wait";
        String TEST_WHILE_IDEL = "spring.datasource.druid.test-while-idle";
        String TIME_BETWEEN_EVICTION_RUNS_MILLIS = "spring.datasource.druid.time-between-eviction-runs-millis";
        String MIN_EVICTABLE_IDLE_TIME_MILLIS = "spring.datasource.druid.min-evictable-idle-time-millis";
        String VALIDATION_QUERY = "spring.datasource.druid.validation-query";
        String TEST_ON_BORROW = "spring.datasource.druid.test-on-borrow";
        String TEST_ON_RETURN = "spring.datasource.druid.test-on-return";
        String POOL_PREPARED_STATEMENTS = "spring.datasource.druid.pool-prepared-statements";
        String FILTERS = "spring.datasource.druid.filters";
        String MAX_POOL_PREPARED_STATEMENT_PER_CONNECTION_SIZE = "spring.datasource.druid.max-pool-prepared-statement-per-connection-size";
        String USE_GLOBAL_DATA_SOURCE_STAT = "spring.datasource.druid.use-global-data-source-stat";
        String CONNECT_PROPERTIES = "spring.datasource.druid.connect-properties";
    }
}
